﻿/****************************************
 *  copyright (c) 2008 leo shen
 *  
 *  all rights reserved         
 * 
 *  e-mail : syl.lucky@gmail.com
 * *************************************/

using System;
using System.Collections.Generic;
using System.Text;

namespace DotUpdater.Core.Versions
{
    public class ProgramVersion : IVersion
    {
        System.Version m_version;

        public ProgramVersion(int major, int minor, int build, int revision)
        {
            m_version = new Version(major, minor, build, revision);
        }

        public ProgramVersion(Version version)
        {
            m_version = version;
        }

        public Version Version
        {
            get
            {
                return m_version;
            }
        }

        #region IVersion Members

        public bool IsLasterThan(IVersion version)
        {
            ProgramVersion otherVersion = (ProgramVersion)version;

            return (this.Version.CompareTo(otherVersion.Version) == 1);
        }

        #endregion
    }
}
